home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- // MODIFY THIS AT YOUR OWN RISK
- //
- // Creation Date: Jan. 7, 1997
- // Author: ap
- //
- // Description: initializes jointContext tool property sheet
- // values
- //
- // Input Arguments:
- // toolName - this is the name of the instance of the tool
- // that the property sheet is modifying.
- //
- // Return Value:
- // None.
- //
-
-
- global proc jointToolValues( string $toolName )
- {
- string $parent = (`toolPropertyWindow -q -location` + "|jointTool");
- setParent $parent;
- string $s;
- int $i;
- int $select;
-
- string $icon = "kinJoint.xpm";
- string $helpTag = "JointTool";
- toolPropertySetCommon $toolName $icon $helpTag;
-
- // Degrees of Freedom
- //
- string $dof = `jointCtx -q -dJ $toolName`;
-
- if ("" != match("none", $dof)) {
- checkBoxGrp -e -v1 off jpDofCheckBoxGrp;
- checkBoxGrp -e -v2 off jpDofCheckBoxGrp;
- checkBoxGrp -e -v3 off jpDofCheckBoxGrp;
- } else {
- if ("" != match("x", $dof)) {
- checkBoxGrp -e -v1 on jpDofCheckBoxGrp;
- } else {
- checkBoxGrp -e -v1 off jpDofCheckBoxGrp;
- }
-
- if ("" != match("y", $dof)) {
- checkBoxGrp -e -v2 on jpDofCheckBoxGrp;
- } else {
- checkBoxGrp -e -v2 off jpDofCheckBoxGrp;
- }
-
- if ("" != match("z", $dof)) {
- checkBoxGrp -e -v3 on jpDofCheckBoxGrp;
- } else {
- checkBoxGrp -e -v3 off jpDofCheckBoxGrp;
- }
- }
-
- string $ajo = `jointCtx -q -ajo $toolName`;
- string $ajoList[] = `optionMenuGrp -q -ils autoJointOrient`;
- for ( $i = 0; $i < size($ajoList); $i++ ) {
- $s = `menuItem -q -l $ajoList[$i]`;
- if ($s == $ajo ) {
- $select = $i + 1;
- optionMenuGrp -e -sl $select autoJointOrient;
- }
- }
-
- // scaleCompensate
- $select = `jointCtx -q -scJ $toolName`;
- if( $select )
- checkBoxGrp -e -v1 1 scaleCompensate;
- else
- checkBoxGrp -e -v1 0 scaleCompensate;
-
- // autoLimits
- $select = `jointCtx -q -jal $toolName`;
- if( $select )
- checkBoxGrp -e -v1 1 autoLimits;
- else
- checkBoxGrp -e -v1 0 autoLimits;
-
- // createIKHandle
- $select = `jointCtx -q -ikh $toolName`;
- if( $select )
- {
- checkBoxGrp -e -v1 1 createIKHandle;
- frameLayout -e -en true -cl false ikHandleFrame;
- }
- else
- {
- checkBoxGrp -e -v1 0 createIKHandle;
- frameLayout -e -en false -cl true ikHandleFrame;
- }
-
- // for ikHandleValues.
- //
- ikHandleOptionValues( $toolName, "jointCtx" );
-
- toolPropertySelect jointTool;
-
- return;
- }
-
-